from django.urls import path
from django.views.generic import TemplateView

from blog.view import article

urlpatterns = [

    # blog应用首页
    path('home/', TemplateView.as_view(template_name="blog_home.html")),

    # 13-实验4-文章JSON列表(分页默认第1页)
    path('article/index/',
         article.index, name='article_index'),

    # 13-实验4-文章JSON列表(分页参数page_index)
    path('article/index/<int:page_index>/',
         article.index, name='article_page_index'),

    # 13-实验4-文章JSON详情
    path('article/<int:id>/',
         article.detail, name='article_detail'),

    # 17-实验5-系统前台设计与实现-列表页
    path('', article.Home.as_view(), name='home'),

    # 18-实验5-系统前台设计与实现-详情页
    path('detail/<int:pk>', article.Detail.as_view(), name='detail'),

]
